export const getLabel = (val, list) => {
    if (Array.isArray(list)) {
        const obj = list.find(item => item.value === val)
        return obj ? obj.label : ''
    } else {
        return ''
    }
}

export const GENDET_LIST = [
    {
        label: '女',
        value: 0
    },
    {
        label: '男',
        value: 1
    },
]

export const CURATIVE_EFFECT_LIST = [
    {
        label: '治愈',
        value: 1
    },
    {
        label: '显著',
        value: 2
    },
    {
        label: '有效',
        value: 3
    },
    {
        label: '无效',
        value: 4
    }
]

export const CURATIVE_EFFECT_LIST_1 = [
    {
        label: '痊愈',
        value: 1
    },
    {
        label: '显效',
        value: 2
    },
    {
        label: '有效',
        value: 3
    },
    {
        label: '无效',
        value: 4
    },
    {
        label: '中断治疗',
        value: 5
    }
]

export const INTERRUPT_REASON_LIST = [
    {
        label: '治愈',
        value: 1
    },
    {
        label: '无效',
        value: 2
    },
    {
        label: '出院',
        value: 3
    },
    {
        label: '不适应',
        value: 4
    },
    {
        label: '其他',
        value: 5
    }
]

export const GUTSER_LEVEL_LIST = [
    {
        label: '高危',
        value: 1
    },
    {
        label: '非高危',
        value: 2
    }
]

export const PSYCHOLOGY_LEVEL_LIST = [
    {
        label: '平静',
        value: 1
    },
    {
        label: '其他',
        value: 2
    }
]

export const CONFIRM_STATUS_LIST = [
    {
        label: '是',
        value: 1
    },
    {
        label: '否',
        value: 0
    }
]

export const PATIENT_TYPE_LIST = [
    {
        label: "门诊", value: 1
    },
    {
        label: "住院", value: 2
    },
    {
        label: "其他", value: 3
    }
]

export const CHARGE_STATE_LIST = [
    // {
    //     label: "未收费", value: 0
    // },
    {
        label: "待缴费", value: 1
    },
    {
        label: "已计费", value: 2
    },
    {
        label: "已结算", value: 3
    }
]

export const THERAPEUTIC_EFFECT_LIST = [
    {
        label: "治愈", value: 1
    },
    {
        label: "显著", value: 2
    },
    {
        label: "有效", value: 3
    },
    {
        label: "无效", value: 4
    }
]